#include <iostream>
using namespace std;
#include <signal.h>
#include <unistd.h>
void handler(int signo)
{
    cout<<"  shigno is :"<<signo<<endl;
}
int main()
{
    signal(2,handler);
    signal(40,handler);
    sigset_t set,oset;
    sigemptyset(&set);
    sigemptyset(&oset);
    sigaddset(&set,2);
    sigaddset(&set,40);
    sigprocmask(SIG_SETMASK,&set,&oset);
    while(true)
    {
        cout<<"i am a process , process id is: "<<getpid()<<endl;
        sleep(1);
    }
    return 0;
}